<?php

/* @var $this yii\web\View */
use \yii\helpers\Url;
$this->title = 'Toefl';
$this->registerJsFile('@web/js/swiper-3.3.1.jquery.min.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/js/index.js',['depends'=>['app\assets\AppAsset']]);
$this->registerCssFile('@web/css/swiper-3.3.1.min.css',['depends'=>['app\assets\AppAsset']]);
$this->registerCssFile('@web/css/index.css',['depends'=>['app\assets\AppAsset']]);
?>
<div class="container">
    <div class="total-lead pull-left">
        <div class="part-lead">
        <div class="read">
            <div class="read-lead leadpart"><span>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-book"></i>&nbsp;&nbsp;阅读</span></div>
            <ul class="read-wrap list-unstyled hidden">
                <?php
                $i = 0;
                $k = 0;
                foreach ($class_1_tpo as $a) {
                    if ($a['class_num']) {
                        $readcontentclass_num[$i] = $a['class_num'];
                        $i = $i + 1;
                    }
                }
                sort($readcontentclass_num);
                $numberof12 = 0;
                $numberoftpomin[] = null;
                $numberoftpomax = 0;
                foreach ($class_1_name as $_1name) {
                    $class1_name = $_1name['name'];
                    foreach ($class_2_name as $b) {
                        $class2_name = $b['name'];
                        if ($b['name'] == 'tpo') {
                            foreach ($readcontentclass_num as $b) {
                                for ($j = 0; $j < $i; $j++) {
                                    while ($b - 12 > 0) {
                                        $b = $b - 12;
                                        $numberof12 += 1;
                                    }
                                    $judge = false;
                                    $numberoftpomin[$k++] = $numberof12 * 12 + 1;
                                    $numberoftpomax = $numberof12 * 12 + 12;
                                    for ($l = 0; $l < $k; $l++) {
                                        $p = $k - 1;
                                        if ($numberoftpomin[$l] == $numberoftpomin[$k - 1] && $l != $p) {
                                            $judge = true;
                                        }
                                    }
                                    if ($judge == false) {
                                        echo '<li>&nbsp;&nbsp;&nbsp;&nbsp;<span>——</span>&nbsp;&nbsp;&nbsp;&nbsp;';
                                        echo "<a href='javascript:;' onclick=getdata(\""  . '&class1=' . $class1_name . '&class2=' . $class2_name . '&beginnum=' . $numberoftpomin[$k - 1] . '&endnum=' . $numberoftpomax . "\")>TPO" . $numberoftpomin[$k - 1] . '-TPO' .$numberoftpomax. '</a>';
                                        echo '</li>';
                                        $judge = true;
                                    } else $k--;
                                }
                                $j = 0;
                                $numberof12 = 0;
                            }
                        } elseif ($b['name'] != 'tpo') {
                            echo '<li>&nbsp;&nbsp;&nbsp;&nbsp;<span>——</span>&nbsp;&nbsp;&nbsp;&nbsp;';
                            echo "<a href='javascript:;' onclick=getdata(\""  . '&class1=' . $class1_name . '&class2=' . $class2_name . "\")>" . $class2_name . '</a>';
                            echo '</li>';
                        }
                    }
                }
                ?>
            </ul>
        </div>
        <div class="write">
            <div class="write-lead leadpart"><span>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-pencil"></i>&nbsp;&nbsp;写作</span></div>
            <ul class="write-wrap list-unstyled hidden">
                <?php
                foreach ($write_class2_name as $b) {
                    $writeclass2_name = $b['name'];
                    echo '<li>&nbsp;&nbsp;&nbsp;&nbsp;<span>——</span>&nbsp;&nbsp;&nbsp;&nbsp;';
                    echo "<a href='javascript:;' onclick=getdata(\""  . '&class1=writing&class2=' . $writeclass2_name . "\")>" . strtoupper($writeclass2_name) . '</a>';
                    echo '</li>';
                }
                ?>
            </ul>
        </div>
        <div class="speak">
            <div class="speak-lead leadpart"><span>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-microphone"></i>&nbsp;&nbsp;&nbsp;口语</span></div>
            <ul class="speak-wrap list-unstyled hidden">
                <?php
                $i=0;
                $k=0;
                $speakcontenthear_number[]=NULL;
                foreach ($speaking_hear_number as $a)
                {
                    if($a['hear_number'])
                    {
                        $speakcontenthear_number[$i] = $a['hear_number'];
                        $i = $i + 1;
                    }
                }
                $numberof12= 0 ;
                $numberoftpomax= 0 ;
                foreach ($speakingclass1_name as $_3name)
                {
                    $speakclass1_name = $_3name['name'];
                    foreach ($speakingclass2_name as $s)
                    {
                        $speakclass2_name = $s['name'];
                        if ($s['name'] == 'tpo')
                        {
                            foreach ($speakcontenthear_number as $b)
                            {
                                for ($j = 0; $j < $i; $j++)
                                {
                                    while ($b - 12 > 0)
                                    {
                                        $b = $b - 12;
                                        $numberof12 += 1;
                                    }
                                    $judge = false;
                                    $numberoftpomin[$k++] = $numberof12 * 12 + 1;
                                    $numberoftpomax = $numberof12 * 12 + 12;
                                    for ($l = 0; $l < $k; $l++) {
                                        $p = $k - 1;
                                        if ($numberoftpomin[$l] == $numberoftpomin[$k - 1] && $l != $p) {
                                            $judge = true;
                                        }
                                    }
                                    if ($judge == false) {
                                        echo '<li>&nbsp;&nbsp;&nbsp;&nbsp;<span>——</span>&nbsp;&nbsp;&nbsp;&nbsp;';
                                        echo "<a href='javascript:;' onclick=getdata(\""  . '&class1=' .$speakclass1_name. '&class2=' . $speakclass2_name . '&beginnum=' . $numberoftpomin[$k - 1] . '&endnum=' . $numberoftpomax . "\")>TPO" . $numberoftpomin[$k - 1] . '-TPO' . "$numberoftpomax" . '</a>';
                                        echo '</li>';
                                        $judge = true;
                                    } else $k--;
                                }
                                $j = 0;
                                $numberof12 = 0;
                            }
                        }
                        else if ($s['name'] != 'tpo') 
                        {
                            echo '<li>&nbsp;&nbsp;&nbsp;&nbsp;<span>——</span>&nbsp;&nbsp;&nbsp;&nbsp;';
                            echo "<a href='javascript:;' onclick=getdata(\""  . '&class1=' .$speakclass1_name. '&class2=' . $speakclass2_name . "\")>" . $speakclass2_name . '</a>';
                            echo '</li>';
                        }
                    }
                }
                ?>
            </ul>
        </div>
        <div class="listen">
            <div class="speak-lead leadpart">
                <a href="http://exam.dianketai.com/" target="_blank"><span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <i class="fa fa-chevron-circle-right"></i>
                    &nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-headphones"></i>&nbsp;&nbsp;&nbsp;听力</span></a>
            </div>
        </div>
        </div>
    </div>
    <div class="know pull-right">
        <span class="h4">考前须知</span>
        <ul class="list-unstyle">
            <li>报名流程</li>
            <li>考前心理状态调节</li>
            <li>口语考试流程及内容详解</li>
            <li>关于托福考位</li>
            <li><a target="_blank" href="https://ke.qq.com/course/181050">寒假托福完美分手计划</a></li>
            <?php foreach ($res_url as $item){
                //var_dump($item);die;
                if($item!=false){
                ?>
                <li><a target="_blank" href="http://www.dianketai.com/kecheng/<?=$item['course_id']?>.html"><?=$item['name']?></a></li>
            <?php }}?>
        </ul>
    </div>
    <div class="main-part center-block">
        <div class="total-part center-block">
            <div class="read-part totalpart">
                <div class="read-part-title"><span>Reading</span></div>
                <div class="read-pra"><span>基础练习</span></div>
                <div class="swiper-container1">
                    <div class="read-part-list swiper-wrapper">
                        <div class="swiper-slide clearfix" id="reading1">
                            <div class="read-part-info">
                                <div class="read-part-wrap">
                                    <div class="top-pic"><img src="<?=Url::to('@web/images/bgtm.png');?>"><div class="top-pas"><i class="fa fa-bookmark"></i>&nbsp;&nbsp;<span class="top-passage"></span><span class="complete"></span></div></div>
                                    <div class="top-title"><span></span><br><span></span></div>
                                     <div class="top-views"><span><i class="fa fa-user"></i>&nbsp;&nbsp;<span class="doit-times"></span></span><span class="nd"></span><span class="ndx">难度：&nbsp;</span></div>
                                    <div class="top-title top-title-ano"><span></span><br><span></span></div>
                                    <div class="top-do"><a href="#"><i class="fa fa-pencil-square-o"></i>做题</a></div>
                                    <div class="top-info"><a href="#">题目详情</a></div>
                                </div>
                            </div>
                            
                        </div>
                    
                    </div>
                    <div class="page">
                    </div>
                </div>
            </div>
            <div class="write-part totalpart">
                <div class="write-part-title"><span>Writing</span></div>
                <div class="write-pra"><span>基础练习</span></div>
                <div class="swiper-container2">
                    <div class="write-part-list swiper-wrapper">
                    <div class="swiper-slide" id="writing1">
                        <div class="read-part-info">
                            <div class="read-part-wrap">
                                <div class="top-pic"><img src="<?=Url::to('@web/images/bgtm.png');?>"><div class="top-pas"><i class="fa fa-bookmark"></i>&nbsp;&nbsp;<span class="complete"></span></div></div>
                                <div class="top-title"><span></span><br><span></span></div>
                                 <div class="top-views"><span><i class="fa fa-user"></i>&nbsp;&nbsp;<span class="doit-times"></span></span><span class="nd"></span><span class="ndx">难度：&nbsp;</span></div>
                                <div class="top-title top-title-ano"><span></span><br><span></span></div>
                                <div class="top-do"><a href="#"><i class="fa fa-pencil-square-o"></i>做题</a></div>
                                <div class="top-info"><a href="#">题目详情</a></div>
                            </div>
                        </div>

                    </div>

                    </div>
                    <div class="page">
                    </div>
                </div>
            </div>
            <div class="speak-part totalpart">
                <div class="speak-part-title"><span>Speaking</span></div>
                <div class="speak-pra"><span>基础练习</span></div>
                <div class="swiper-container3">
                    <div class="speak-part-list swiper-wrapper">
                    <div class="swiper-slide" id="speaking1">
                        <div class="read-part-info">
                            <div class="read-part-wrap">
                                <div class="top-pic"><img src="<?=Url::to('@web/images/bgtm.png');?>"><div class="top-pas"><i class="fa fa-bookmark"></i>&nbsp;&nbsp;<span class="complete"></span></div></div>
                                <div class="top-title"><span></span><br><span></span></div>
                                 <div class="top-views"><span><i class="fa fa-user"></i>&nbsp;&nbsp;<span class="doit-times"></span></span><span class="nd"></span><span class="ndx">难度：&nbsp;</span></div>
                                <div class="top-title top-title-ano"><span></span><br><span></span></div>
                                <div class="top-do"><a href="#"><i class="fa fa-pencil-square-o"></i>做题</a></div>
                                <div class="top-info"><a href="#">题目详情</a></div>
                            </div>
                        </div>
                    </div>
                    
                    </div>
                    <div class="page">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="addpart"></div>

<div class="read-part-info hidden model">
    <div class="read-part-wrap">
        <div class="top-pic"><img src="<?=Url::to('@web/images/bgtm.png');?>"><div class="top-pas"><i class="fa fa-bookmark"></i>&nbsp;&nbsp;<span class="top-passage"></span><span class="complete"></span></div></div>
        <div class="top-title"><span></span><br><span></span></div>
         <div class="top-views"><span><i class="fa fa-user"></i>&nbsp;&nbsp;<span class="doit-times"></span></span><span class="nd"></span><span class="ndx"><span class="radious"></span>&nbsp;&nbsp;</span></div>
        <div class="top-title top-title-ano"><span></span><br><span></span></div>
        <div class="top-do"><a href="#"><i class="fa fa-pencil-square-o"></i>做题</a></div>
        <div class="top-info"><a href="#">题目详情</a></div>
    </div>
</div>
<script>
    window.onload=function(){
        getdata("&class1=reading&class2=tpo&beginnum=25&endnum=36");
        getdata("&class1=speaking&class2=tpo&beginnum=1&endnum=12");
        getdata("&class1=writing&class2=tpo");
    }
</script>
